Sharing configuration between bots

As multiple (or even all) bots often have common configuration parameter settings (e.g., the same sendMetaDataUrl), VoiceAI Connect eliminates the need to duplicate configuration between the bots. Instead, it lets you specify a bot as the "base" configuration, whose configuration can then be used by any other bot configuration. In other words, these other bots inherit the configuration of the "base" bot.

The "base" bot is not considered an actual (deployed) bot, but only used as a configuration template by other deployed bots.

The "base" bot is indicated by the isBase parameter. To inherit the "base" configuration, the real bot should be configured with the extends parameter whose value is configured to the name parameter's value of the "base" bot.

The following table describes these parameters:

Parameter

Type

Description

isBase

Boolean

Defines this bot's configuration as a "base" configuration.

  • true

  • false (Default)

Note:

  • A "base" bot is not a real deployed bot (and cannot be used as a bot), but is only a template that allows other bots to inherit its configuration.

  • The following parameters must not be configured for a "base" bot:

    • extends

    • provider

    • displayName

extends

String

Specifies the "base" configuration (configured by the isBase parameter) to use for the current bot.

The value of the parameter is the value of the name parameter of the "base" bot.

Note:

  • The bot inherits all the parameters from the "base" configuration, except the following:

    • name

    • isBase

  • If a parameter appears on both the "base" bot and the current bot configuration, the parameter value of the current bot configuration takes precedence.

Example

Below shows an example of two bots ("bot1" and "bot2") that share the same configuration, which is inherited from the "base" bot ("my-base-bot-conf"):

[
    {
        "name": "my-base-bot-conf",
        "isBase": true,
        "voiceName": "en-US-GuyNeural",
        "sendMetaDataUrl": "http://my-test/path/${getSIPHeader('X-My-Header')}",
        "credentials": {
            "sendMetaDataUsername": "metadata-user",
            "sendMetaDataPassword": "metadata-pass"
        }
    },
    {
        "name": "bot1",
        "displayName": "bot1",
        "provider": "my-provider",
        "extends": "my-base-bot-conf",
        "credentials": {
            "botSecret": "abc"
        }
    },
    {
        "name": "bot2",
        "displayName": "bot2",
        "provider": "my-provider",
        "extends": "my-base-bot-conf",
        "credentials": {
            "botSecret": "def"
        }
    }
]